﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ListToDelete.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Actions.Wss.Entities
{
    using System;
    using System.Xml.Serialization;

    using SharePoint.Wss.Attributes;
    using SharePoint.Wss.Entities;

    [CollaborisClass(
        Title = "List To Delete",
        ReleaseStatus = ReleaseStatus.Beta,
        DisableDocumentation = false,
        ContactAuthorEmail = "Support@Collaboris.co.uk",
        Summary = "Defines the parameters delete a list."
    )]
    [Serializable]
    public class ListToDelete : WSSEntityBase
    {
        private string listName;
        
        private bool? destroy;
        
        private bool? listItemsOnly;

        [CollaborisProperty(
            Summary = "Specifies whether to delete the list items only (i.e. not the list itself).",
            Title = "List Items Only",
            Example = @"false",
            Remarks = "If this is set to 'True' the list will not be deleted, only the data.",
            InputHint = InputHint.NullableBoolean)]
        [XmlElement(IsNullable = true)]
        public bool? ListItemsOnly
        {
            get
            {
                return this.listItemsOnly;
            }
            set
            {
                this.listItemsOnly = value;
            }
        }

        [CollaborisProperty(
            Summary = "Specifies whether to permanently delete the list.",
            Title = "Destroy",
            Example = @"false",
            Remarks = "If this is set to 'True' then the list (or list items) cannot be recovered!",
            InputHint = InputHint.NullableBoolean)]
        [XmlElement(IsNullable = true)]
        public bool? Destroy
        {
            get
            {
                return this.destroy;
            }
            set
            {
                this.destroy = value;
            }
        }

        [CollaborisProperty(
           Summary = "Specifies the name of the list to perform the delete on.",
           Title = "Destroy",
           Example = @"PersonList",
           Required = true,
           InputHint = InputHint.SingleText)]
        [XmlAttribute]
        public string ListName
        {
            get
            {
                return this.listName;
            }
            set
            {
                this.listName = value;
            }
        }      
    }
}